package com.itheima.work1118;

import java.util.ArrayList;
import java.util.Iterator;
import java.util.Random;

public class Arraylist {
    public static void main(String[] args) {
        ArrayList<String> list = new ArrayList<String>();
        Random rand = new Random();
        for (int i = 0; i < 10; i++) {
            list.add(rand.nextInt(100,201) + " ");
        }
//        System.out.println(list);
        Iterator<String> iterator = list.iterator();
        while (iterator.hasNext()) {
            System.out.print(iterator.next());
        }
        list.remove(9);
        list.remove(7);
        list.remove(3);
        System.out.println(list);
    }



}
